package com.zzjson.aop.service;

import com.zzjson.aop.annoation.MyLog;
import com.zzjson.aop.model.Member;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2019 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : com.zzjson.aop.service</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2019年06月10日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
@Service
public class MemberService implements IMemberService {
	private final Logger log = Logger.getLogger(MemberService.class);

	@Override
	@MyLog("get id()")
	public Member get(long id) {
		log.info("getMemberById method . . .");
		return new Member();
	}

	@Override
	@MyLog("get ()")
	public Member get() {
		log.info("getMember method . . .");
		return new Member();
	}

	@Override
	@MyLog("save member")
	public void save(Member member) {
		log.info("save member method . . .");
	}

	@Override
	@MyLog("delete id ")
	public boolean delete(long id) {
		log.info("delete method . . .");
		throw new RuntimeException("spring aop ThrowAdvice演示");
	}
}